import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsInt, ValidateNested } from 'class-validator';

export class AppGatherDtoParams {
  @ApiProperty({ required: false, description: '分类id' })
  classificationId: number;

  @ApiProperty({ required: false, description: '合辑名称' })
  name?: string;
}

export class AppGatherListDto {
  @ApiProperty()
  @IsInt()
  pageSize: number;

  @ApiProperty()
  @IsInt()
  pageNum: number;

  @ApiProperty()
  @ValidateNested()
  @Type(() => AppGatherDtoParams)
  params: AppGatherDtoParams;
}
